using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Web.Configuration;

public partial class SqlDataSourceByCodePage : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        SqlDataSource sqlDataSource = new SqlDataSource();
        sqlDataSource.ConnectionString = 
        WebConfigurationManager.ConnectionStrings[
            "RecruitVietnamDbConnectionString"].ConnectionString;
        sqlDataSource.SelectCommandType= SqlDataSourceCommandType.Text;
        sqlDataSource.SelectCommand="Select UserID,ResumeID,ContactEmail,CurrentCompany from tblJSResumes";
        GridView gridView  = new GridView();        
        gridView.DataSource= sqlDataSource;
        gridView.DataBind();
        this.form1.Controls.Add(gridView);
    }
}
